#ifndef _RS485_COMM_ANALYSE_H_
#define _RS485_COMM_ANALYSE_H_
#include "rs485_comm_analyse_common.h"
#include "stdint.h"
extern RS485_COM_ST r485_cs;

// extern StaticQueue_t xCtrlUnitStaticQueue; // 队列结构体

// extern QueueHandle_t xCtrlUnitQueueHandle; // 声明队列句柄

// // 7次查询，放2个循环的量，取每次最大的量，即 7*2*128=238
// extern StaticQueue_t xReqUnitStaticQueue; // 队列结构体

// extern QueueHandle_t xReqUnitQueueHandle; // 声明队列句柄
int rs485_com_comm_and_relay_unit_status_init(struct one_com_status *ocs);

int get_need_send_to_relay_order(struct one_com_status *ocs, uint8_t *send_data, uint16_t *send_lenth);

void analyse_receive_response(struct one_com_status *ocs, int ret, uint8_t *receive_byte, uint16_t receive_lenth);

uint8_t get_box_from_bound_index(uint8_t index);
uint8_t get_index_from_bound_box(uint8_t box_value);

#endif // !_RS485_COMM_ANALYSE_H
